import request from '@/utils/request'

const api = {
  getPickingBoxPageUrl: '/base_picking_box/get_picking_box_page',
  getPickingBoxDetailUrl: '/base_picking_box/get_picking_box_detail',
  getPickingBoxInvUrl: '/base_picking_box/get_picking_box_inv',
  editBasePickingBoxUrl: '/base_picking_box/edit_base_picking_box',
  editBasePickingBoxDetailUrl: '/base_picking_box/edit_base_picking_box_detail',
  addPickingBoxInvUrl: '/base_picking_box/add_picking_box_inv',
  deleteBasePickingBoxUrl: '/base_picking_box/delete_base_picking_box',
  deletePickingBoxDetailUrl: '/base_picking_box/delete_picking_box_detail',
  deletePickingBoxInvUrl: '/base_picking_box/delete_picking_box_inv',
}

export async function deletePickingBoxInvApi(params: Map<string, any>) {
  const res = await request({
    url: api.deletePickingBoxInvUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function deletePickingBoxDetailApi(params: Map<string, any>) {
  const res = await request({
    url: api.deletePickingBoxDetailUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function deleteBasePickingBoxApi(params: Map<string, any>) {
  const res = await request({
    url: api.deleteBasePickingBoxUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function editBasePickingBoxDetailApi(params: Map<string, any>) {
  const res = await request({
    url: api.editBasePickingBoxDetailUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function getPickingBoxPageApi(params: Map<string, any>) {
  const res = await request({
    url: api.getPickingBoxPageUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function getPickingBoxDetailApi(params: Map<string, any>) {
  const res = await request({
    url: api.getPickingBoxDetailUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function getPickingBoxInvApi(params: Map<string, any>) {
  const res = await request({
    url: api.getPickingBoxInvUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function editBasePickingBoxApi(params: Map<string, any>) {
  const res = await request({
    url: api.editBasePickingBoxUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function addPickingBoxInvApi(params: Map<string, any>) {
  const res = await request({
    url: api.addPickingBoxInvUrl,
    method: 'post',
    data: params,
  })
  return res
}
